package se.study.io.ser;

import java.io.Serializable;

/**
 * @Author: tiger
 * @Date:2018/5/8
 * @Description:要想序列化一个java对象，其类必须实现接口：java.io.Serializable
 */
public class Person implements Serializable {
    private String userName;
    private transient String password;
    private int age;

    @Override
    public String toString() {
        return "Person{" +
                "userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", age=" + age +
                '}';
    }

    public Person(String userName, String password, int age) {
        this.userName = userName;
        this.password = password;
        this.age = age;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }


    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
